package org.computumus.core.service.UserIdentityService.impl;

import org.computumus.core.service.UserIdentityService.User;
import org.computumus.core.service.UserIdentityService.UserIdentityService;
import org.computumus.core.session.Session;

/**
 * Created by IntelliJ IDEA.
 * User: planadecu
 * Date: 25 juin 2010
 * Time: 19:25:46
 * To change this template use File | Settings | File Templates.
 */
public class UserIdentityServiceImpl implements UserIdentityService{
    public User getUser(Session session) {
        if(session.isLogged()){
            return new UserImpl(session.getUserName());
        }else{
            return new UserImpl("anonymous");
        }

    }
}
